package com.baizhi.myexception;

public class StudentDemo {
    public static void main(String[] args) {
        Student st = new Student();
        try {

            st.setName("张三三三三san ");
            st.setAge(1000);

        } catch (NameIsNotLegalException e) {
            e.printStackTrace();
        } catch (AgeIsNotLegalException e) {
            e.printStackTrace();
        }

        System.out.println(st.getName() + ":" + st.getAge());
    }
}
